package fr.cephb.joperon.webapp.tag;

import java.io.IOException;


import javax.servlet.jsp.JspWriter;

import fr.cephb.joperon.core.Fid;


public class FidTag  extends AbstractContentTag
	{
	private static final long serialVersionUID = 1L;

	public FidTag()
		{
		}
	
	@Override
	public void print(JspWriter out, String content) throws IOException
		{
		try {
			Fid fid= new Fid(content);
			if(fid.isValid())
				{
				out.print("("+fid.getOrganism()+")"+fid.getChromosome()+":"+fid.getPosition());
				return;
				}
			} 
		catch (Exception e)
			{
			}
		out.print(content);
		}
	
	
	}
